home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / search / lsmsearc.tar / lsmsearc / lsmsearch / README < prev   
Text File  |  1995-07-12  |  6KB  |  130 lines

  1. The Linux Software Map is a huge list of software that has been ported
  2. to or written for Linux.  I wrote 'lsmsearch' to make it easier to
  3. browse this list and search for software.  It accepts any valid perl
  4. regular-expression as a search string, and can search either entire
  5. records, or limit the search to the Keywords, Title, and/or Description
  6. fields.  It does CASE-INSENSITIVE searches. It uses dialog for a nice
  7. interface, or it can be used from the commandline alone.  I've included 
  8. two versions of lsmsearch.  lsmsearch-dialog uses dialog and can be used 
  9. interactively or from the commandline.  lsmsearch-cmdline doesn't use dialog
  10. and only works from the commandline.  
  11.  
  12.  
  13. REQUIRED:
  14. 1)  You need perl 5.000 or greater.  A binary release of Perl 5.001 for
  15. Linux is available at sunsite.unc.edu /pub/Linux/devel/perl or any
  16. sunsite mirror site in a.out or ELF formats.
  17.  
  18. 2)  If you want to use the interactive version of the program, you need
  19. dialog 0.4 or greater to use the dialog perl interface I've included
  20. with this package.  Type 'dialog -h' at your prompt to see what version
  21. of dialog you have; it should say "dialog version 0.3 ..... patched to
  22. version 0.4 ...".  Dialog is available at
  23. "sunsite.unc.edu:/pub/Linux/utils/shell/dialog-0.5.tar.gz" or any
  24. sunsite mirror site. (dialog.pl that I've included is taken from the
  25. dialog 0.5 release.  I've just included it in case you don't already
  26. have it, but I didn't write it.)
  27.  
  28. 3)  A copy of the LSM file (Linux Software Map).  This is what lsmsearch uses
  29. as its database.  You can get the latest copy from 
  30. "sunsite.unc.edu /pub/Linux/docs/LSM.gz".  I'll say in the install section
  31. where to put this file so lsmsearch can find it.
  32.  
  33. INSTALL:
  34. 1)  Make sure you have the right versions of Perl and dialog as stated above.
  35.  
  36. 2)  Get a copy of the LSM file.  Make sure it is gzipped (should end in .gz)
  37.  
  38. 3)  Edit the version of lsmsearch that you plan to use.
  39. 'lsmsearch-dialog' uses dialog for an interactive interface, and
  40. 'lsmsearch-cmdline' only has a commandline interface.  The only parts you
  41. should need to change are at the top.
  42.          o  Change the line that reads:
  43.        #!/usr/local/bin/perl
  44.        to point to the actual location of your perl binary.  
  45.     o  Change the line that reads
  46.        $LSMFILE = "/usr/local/lib/LSM.gz";
  47.        to point to the actual location of your lsmfile.  Or just put your
  48.        LSM file in /usr/local/lib/ and name it LSM.gz and don't change
  49.        this line.
  50.  
  51. 4)  If you choose to use the dialog version, copy 'dialog.pl' to your
  52. perl library directory -- probably this is either /usr/lib/perl5/ or
  53. /usr/local/lib/perl5/.
  54.  
  55. 5)  Copy lsmsearch-dialog or lsmsearch-cmdline to your bin directory
  56. (maybe /usr/local/bin), under the name 'lsmsearch'.
  57.  
  58.  
  59.  
  60. USAGE INSTRUCTIONS:
  61. ------------------------------------------------------
  62. --- Interactive Use:
  63. Only lsmsearch-dialog works interactively, though it can also be used from the
  64. commandline.
  65.     To use lsmsearch interactively, just type 'lsmsearch', and it will
  66. present the main menu.  
  67.  
  68.     Options Menu:
  69. Use this menu item to limit the search to the Keywords, Title, and/or
  70. Description fields.  Once in the Options menu, use the arrow keys to go to an
  71. option, and the space bar to toggle an option on or off. If you choose more
  72. than one option, it will search all the fields that you've selected.  For
  73. instance if you select 'Keywords' and 'Description', then when you search, it
  74. will display all records containing the search string in the Keywords field
  75. or the Description field.
  76.  
  77.     Search item:
  78. This presents you with a box to enter a regular expression to search for.
  79. The important thing is that whatever you enter is treated as a valid Perl
  80. regexpression.  This means you must backslash any special characters that you
  81. don't want to be treated as part of a regexpression.  For example, to search
  82. for 'C++', you would enter 'C\+\+'.  If you don't know about regular
  83. expressions, a good rule to follow is:  Just put a backslash before any
  84. character that isn't a letter or number.  (Or read the perl manpage 
  85. 'perlre (1P)' to learn about regexpressions. :)  lsmsearch always does a
  86. CASE-INSENSITIVE search.  So entering 'Editor' and 'editor' are the same.
  87.  
  88.     Quit:
  89. Quits the program.
  90.  
  91.   After you search for an item, all records that contain a match will be
  92. displayed in a dialog textbox.  Use PGUP/PGDOWN or the arrow keys to scroll, 
  93. '/' to search for a string, and Enter to return to the main menu.
  94.  
  95. --- Use from the commandline:
  96. Both versions work from the command line.
  97. Use one or more options and a searchstring/regexpression.
  98. Options are:
  99.     -k   -- limit search to the Keywords Field
  100.     -t   -- limit search to the Title field
  101.     -d   -- limit search to the Description field.
  102.     -h   -- Display a usage message and list of options.
  103.  
  104.     regexp -- A search string or valid regular expression.
  105.  
  106. When using from the command line, the program will search directly for the
  107. search string, and exit when you are done viewing the found records.
  108.  
  109.  
  110. EXAMPLES:
  111.     lsmsearch
  112. Starts up lsmsearch in interactive mode.
  113.  
  114.       lsmsearch -k -d 'editor'
  115. lsmsearch finds all LSM records containing the string 'editor' in the
  116. Keywords field or the Description field and displays them.  The program will
  117. exit when you are done viewing them.
  118.  
  119.     lsmsearch 'game|vga'
  120. lsmsearch treats the search string as a regular expression.  So it finds all
  121. records containing the word 'game' or the word 'vga'.  Searches the whole
  122. record since I didn't give any limiting options.
  123.  
  124. PROBLEMS:
  125. o  You get an error or unexpected results after entering a search string:
  126.    Remember that this program treats search strings as valid Perl regexps.  
  127.    Put a backslash before any character that isn't a letter or number unless
  128.    you mean to use it as part of a regular expression.  Read the perlre
  129.    manpage.
  130.